
pkgname=rfkill
pkgver=0.5
pkgrel=4
pkgdesc="Tool to query and set the rfkill state of wireless devices"
arch=('x86_64')
url="http://linuxwireless.org/en/users/Documentation/rfkill"
license=('custom')
depends=('glibc' 'filesystem')
source=("https://www.kernel.org/pub/software/network/rfkill/${pkgname}-${pkgver}.tar.xz"
        '60-rfkill.rules'
        'service.block'
        'service.unblock')
backup=(etc/conf.d/rfkill)
md5sums=('ce834c00c049cd86a04ab115c92ef548'
         '63f9bf9264911242e430867a41e8918c'
         'a5835e0d5686ad1a12644edc3333d886'
         '3a87d0d77656f005fbd9c3b003dadc90')

build() {
  cd ${pkgname}-${pkgver}
  
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE

  install -Dm644 ${srcdir}/60-rfkill.rules ${pkgdir}/usr/lib/udev/rules.d/60-rfkill.rules
  install -Dm644 ${srcdir}/service.block ${pkgdir}/usr/lib/systemd/system/rfkill-block@.service
  install -Dm644 ${srcdir}/service.unblock ${pkgdir}/usr/lib/systemd/system/rfkill-unblock@.service
}

